<template>
<div>
<el-form ref="form" :model="form" label-width="80px">
  <el-form-item label="用户名">
    <el-input v-model="form.name"></el-input>
  </el-form-item>
  <el-form-item label="密码">
    <el-input v-model="form.gender"></el-input>
  </el-form-item>
<el-form-item>
    <el-button type="primary" @click="onLogin">登陆</el-button>
    <el-button type="primary" @click="onSubmit">注册</el-button>
  </el-form-item>
</el-form>
<!--<router-view/>-->
</div>
</template>

<script>
// import {mapState} from 'vuex'
  export default {
    name:'login',
    data() {
      return {
        form: {
          name: '',
          gender: '',
          age: '',
          school: '',
        }
      }
    },
    methods: {
      onSubmit(){
      // console.log(this.$store);
      this.$router.push('regist')
      
    },
      onLogin(){
      this.$router.push('management')
      }
    }
  }
</script>